//
//  Fraction.h
//  OC02_类和对象
//
//  Created by Hanlingyu on 16/7/5.
//  Copyright © 2016年 ltq. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface Fraction : NSObject

@property NSInteger numerator;
@property NSInteger denominator;

- (instancetype)initWithNumerator:(NSInteger)numerator
                      denominator:(NSInteger)denominator;
+ (instancetype)fractionWithNumerator:(NSInteger)numerator
                          denominator:(NSInteger)denominator;
// 最小公倍数求法
- (NSInteger)gcdOfFirstNumber:(NSInteger)firstNUmber
                 secondNumber:(NSInteger)secondNumber;
// 约分的方法
- (void)reduction;

- (Fraction *)addWith:(Fraction *)anotherFraction;
- (Fraction *)subWith:(Fraction *)anotherFraction;
- (Fraction *)mulWith:(Fraction *)anotherFraction;
- (Fraction *)divWith:(Fraction *)anotherFraction;

- (void)outPut;

- (NSString *)description;//


@end
